<template>
  <div id="index_id">
      <h1>首页</h1>
      <h2>这里是第{{page}}页</h2>
      <ul>
        <li v-for="i in 10" :key="i">
          <router-link :to="'/index?page='+i">{{i}}</router-link>
        </li>
      </ul>
  </div>
</template>

<script>
export default {
    data(){
      return {
        page: 0
      }
    },
    created(){
        this.page = this.$route.query.page
        console.log(this.$route)
    },

}
</script>

<style>
#index_id h1{
    text-align: center;
}
</style>